package com.example.news.pojo.form;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

@Data
@Schema(description = "新闻请求类")
public class ArticleForm {

    @Schema(description = "新闻id")
    private Integer id;

    @Schema(description = "标题")
    @NotEmpty(message = "标题不能为空")
    private String title;

    @Schema(description = "内容")
    @NotEmpty(message = "内容不能为空")
    private String content;

    @Schema(description = "封面")
    private String cover;

    //  private Integer status;
    @Schema(description = "发布者id")
    @NotEmpty(message = "用户id不能为空")
    private Integer userId;

    @Schema(description = "种类")
    @NotEmpty(message = "种类不能为空")
    private Integer type;
}